<%=render :partial => "/frame_top" %>
	<h1 id="core_name" rif="<%= @core.id %>"><%= @core.name %></h1>
	<% if @core.kinds.size > 0%>
	<div id="core_kinds_div">
		<% @core.kinds.each do |kind| %>
			<a style="color:<%= kind.color %>"><%= kind.name(I18n.locale) %></a>
			<%= "/" if kind != @core.kinds.last %>
		<% end%>
	</div>	
	<% end %>		
	<div id="core_right_div">		
		<%= render :partial => "/" + @core.class.to_s.downcase + "s/view" %>		
		<% if @core.sites.to_s != "" %>
			<div class="core_details_div">
				<span>+ info</span>
				<% @core.sites.to_s.split(" , ").each do |i|%>
					<p><%= link_to(i, i) %></p>
				<% end%>
			</div>
		<% end %>
				
	</div>
	<div id="core_left_div" style="min-height:400px;list-style:none;">
		<a href="#" onclick="return bookmarkCore(<%= "#{@core.id},'yes'" %>)">
				<p class="link_gray_ani bookmark_core<%= " bookmark_core_clicked" if current_user and current_user.bookmarks.exists?(@core) %>">
				<%=t "#{@core.class.to_s.downcase}.bookmark" %>
			</p>
		</a>		
		<div style="height:300px;overflow:hidden;width:200px;">
		<div class="core_photo_slide" style="border:0">
			<%  images = @core.images_view
				for i in images %> 
				<p <%= "style='display:none'" if i != images.first %>>
					<%= link_to image_tag(i[:big]), i[:original] %>
				</p>  
			<% end%>			
		</div> 
		</div>
		<% if ["Event", "Review"].include?(@core.class.to_s) %>
		<div id="core_who_voted_div">
			<p class="core_who_voted_title"> consigliato da <a href="#" onclick="return voteCore(<%= "#{@core.id},'yes'" %>)">+</a></p>
			<div id="who_voted_yes">
				<% for i in User.find(:all, :include => :votes, :conditions => ["votes.core_id = ? and votes.vote = 1", @core.id]) %>
				<a href="/<%= i.alias %>" <%= "id='voted_by_me'" if current_user and current_user.id == i.id %>>
					<div class="mini_button_form left" style="background-color:#<%= i.colors %>;"><%= i.name %></div>
				</a>
				<% p = 1 if current_user and current_user.id == i.id 
				end %>				
				<div class="separator"><span></span></div>
			</div>			
			<p  class="core_who_voted_title" style="margin:2px 0;"> sconsigliato da <a href="#" onclick="return voteCore(<%= "#{@core.id},'no'" %>)">-</a></p>
			<div id="who_voted_no">
				<% for i in User.find(:all, :include => :votes, :conditions => ["votes.core_id = ? and votes.vote = -1", @core.id]) %>
				<a href="/<%= i.alias %>" <%= "id='voted_by_me'" if current_user and current_user.id == i.id %>>
					<div class="mini_button_form left" style="background-color:#<%= i.colors %>;"><%= i.name %></div>
				</a>
				<% p = 1 if current_user and current_user.id == i.id 
				end %>
				<div class="separator"><span></span></div>
			</div>		
			<div id="who_voted_nothing">
				<% if current_user and p.to_i != 1 %>
				<a href="/<%= current_user.alias %>" id="voted_by_me">
					<div class="mini_button_form left" style="background-color:#<%= current_user.colors %>;"><%= current_user.name %></div>
				</a>
				<% end %>
			</div>	
		</div>
		<% end %>
	</div>
	<div class="separator"><span></span></div>
	<div class="core_votes_readings_div">		
		<div class="core_adsense_div">
			<script type="text/javascript"><!--
			google_ad_client = "pub-1217068928246516";
			/* 468x60, creato 20/01/10 */
			google_ad_slot = "1434959529";
			google_ad_width = 468;
			google_ad_height = 60;
			//-->
			</script>
			<script type="text/javascript"
			src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
			</script>
		</div>			
		<% if ["Event", "Review"].include?(@core.class.to_s) %>
		<div class="left">
			<a href="#" onclick="return voteCore(<%= "#{@core.id},'yes'" %>)">+</a>
			<a href="#" onclick="return voteCore(<%= "#{@core.id},'no'" %>)">-</a>
		</div>
		<% end %>
		<div class="core_votes_div" <%= "style='background-color:red;'" if @core.vote < 0 %>>
			<p id="core_votes_vote"><%= @core.vote %></p><span><%=t "core.votes" %></span>
		</div>
		<div class="core_readings_div"><p><%= @core.readings %></p><span><%=t "core.readings" %></span></div>									
		<div class="separator" style="float:none;"><span></span></div>
	</div>
<%=render :partial => "/frame_bottom" %>
<%=render :partial => "/frame_top" %>
	
	<h1 style="color:#666;"><span id="comment_count"><%= @comments_count %></span> <%=t "core.comments" %></h1>	
	<div id="comments_div">
		
		<% if @comments.length > 0 %> 
			<%= render(:partial => "/cores/comments", :object => @comments) %>			
		<% else%>
			<div class="no_comments_div"><%=t "core.no_comments" %></div>
		<% end %>		
	</div>
	<%= render :partial => "/index_pages" , :object => { :selected => @comments_count / 20, 
			:pages => @comments_count / 20, :class => "comment", :hide => @comments_count / 20 == 0 } %>
	
	<% form_for :comment, :html => { :id => "comment_form" }, :url => "/cores/new_comment?last_comment_id=#{@comments.length > 0 ? @comments.first.id : 0}" do |comment_form| -%>
		<label for="comment_message"><%=t "core.write_comment" %>:</label><br />
		<%= comment_form.text_area :message %>
		<%= comment_form.hidden_field :core_id, :value => @core.id %>		
		
		<a href="#" onclick="$('#comment_form').submit();return false;" style="display:block;margin-top:15px;" 
				class="button_form">insert it!</a>
		
	<% end %>
<%=render :partial => "/frame_bottom" %>
<%=render :partial => "/frame_top" %>
	<h1 style="color:#666;"><span id="multimedia_count"><%= @multimedia_count %></span> <%=t "core.multimedia" %></h1>
	<div id="multimedias_div">		
		<% if @multimedias.length > 0 %> 
			<%= render(:partial => "/cores/multimedias", :object => @multimedias) %>			
		<% else%>
			<div class="no_multimedias_div"><%=t "core.no_multimedias" %></div>
		<% end %>		
	</div>
	<a href="#" onclick="$('#modal_upload_photo_div').dialog('open');return false;">Upload photos...</a>
	<div id="modal_upload_photo_div" style="display:none;">
		<%= render :partial => "/multimedias/upload_photo" %>
	</div>
<%=render :partial => "/frame_bottom" %>